package com.wy.sx_webservice_server.service;

import com.wy.sx_webservice_server.model.User;
import org.springframework.stereotype.Service;

import javax.jws.WebService;
import java.util.ArrayList;
import java.util.List;

/**
 * @描述
 * @创建人 wangyue
 * @创建时间2019/9/1010:31
 */
@Service
@WebService(serviceName = "WebServiceDemoService", // 与接口中指定的name一致
        targetNamespace = "http://sx_webservice_server.wy.com", // 与接口中的命名空间一致,一般是接口的包名倒
        endpointInterface = "com.wy.sx_webservice_server.service.WebServiceDemoService" // 接口地址
)
//@WebService
public class WebServiceDemoServiceImpl implements WebServiceDemoService {
    @Override
    public String hello(String name) {
        return "调用服务成功了"+name;
    }

    @Override
    public List<User> getUser(User user) {
        List<User> userlist = new ArrayList<User>();
        User user1 = new User("1","张三");
        User user2 = new User("2","李四");
        userlist.add(user1);
        userlist.add(user2);
        userlist.add(user);
        return userlist;
    }
}
